﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Information.System.Model.View
{
    /// <summary>
    /// 二级列表结构
    /// </summary>
    public class TreeNodeVM
{
        [Display(Name = "主键")]
        public string Id { get; set; }

        [Display(Name = "菜单标题")]
        public string Name { get; set; }

        [Display(Name = "菜单值")]
        public string Value { get; set; }

        [Display(Name = "排序")]
        public int SortIndex { get; set; }


        [Display(Name = "节点路径")]
        public string Path { get; set; }
        [Display(Name = "父节点")]
        public string ParentID { get; set; }

        [Display(Name = "是否展开")]
        public bool Open { get; set; }
        [Display(Name = "子菜单")]
        public List<TreeNodeVM> Children { get; set; }

        
    }

    public class TreeDepartmentNodeVM {
        [Display(Name = "节点标题")]
        public string Name { get; set; }

        [Display(Name = "节点标题")]
        public string Title { get; set; }


        [Display(Name = "节点id")]
        public string Id { get; set; }
        [Display(Name = "节点字段名")]
        public string FieldId { get; set; }
        [Display(Name = "负责人")]
        public string LeaderID { get; set; }

        [Display(Name = "负责人名字")]
        public string LeaderName { get; set; }
        [Display(Name = "上一级部门")]
        public string ParentID { get; set; }
        [Display(Name = "路径")]
        public string Path { get; set; }

        [Display(Name = "排序")]
        public int? SortIndex { get; set; }

        [Display(Name = "子节点")]
        public List<TreeDepartmentNodeVM> Children { get; set; }

        [Display(Name = "是否展开")]
        public bool Spread { get; set; }
        [Display(Name = "是否选中")]
        public bool Checked{get;set;}
        [Display(Name = "是否禁用")]
        public bool Disabled { get; set; }


    }
}
